﻿using Quartz;
using System;
using System.Threading.Tasks;
using WaterCloud.Code;
using WaterCloud.Service.STZBManage;

namespace WaterCloud.Web.Job
{
    /// <summary>
    /// 处理公示期账号状态
    /// </summary>
    public class MyPP_Job : IJob
    {
        /// <summary>
        /// 业务逻辑层
        /// </summary>
        public STZB_AccountService _accountService { get; set; }

        public MyPP_Job(STZB_AccountService sTZB_Account)
        {
            _accountService = sTZB_Account;
        }

        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                await _accountService.UpdateGgState();
            }
            catch (Exception ex)
            {
                LogHelper.WriteWithTime(ex);
            }
        }
    }
}
